﻿//  Copyright (c) 2011 Ray Liang (http://www.dotnetage.com)
//  Dual licensed under the MIT and GPL licenses:
//  http://www.opensource.org/licenses/mit-license.php
//  http://www.gnu.org/licenses/gpl.html

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace DNA.Mvc.jQuery
{
    public class ToolbarBuilder : ViewComponentBuilder<Toolbar, ToolbarBuilder>
    {
        public ToolbarBuilder(Toolbar component, ViewContext context, IViewDataContainer container) : base(component, context, container) { }

        public ToolbarBuilder Buttons(Action<ToolbarButtonFactory> buttons)
        {
            var fac = new ToolbarButtonFactory(Component, this.ViewContext,this.ViewDataContainer);
            buttons.Invoke(fac);
            return this;
        }

        public ToolbarBuilder ShowDragHandler(bool value)
        {
            Component.ShowDragHandler = value;
            return this;
        }

    }

   

}
